TESTS: Remove Static Threadpool in TaskManagerTest#36976
Merged
original-brownbear merged 1 commit intoelastic:masterfrom Jan 3, 2019
Merged
TESTS: Remove Static Threadpool in TaskManagerTest#36976original-brownbear merged 1 commit intoelastic:masterfrom
original-brownbear merged 1 commit intoelastic:masterfrom
Conversation
* The static threadpool leaks a lot of memory in these tests because it prevents things like the connect listeners from `org.elasticsearch.transport.TcpTransport#initiateConnection` to be GCed between tests (since they keep being referenced by the threadpool) which in turn reference channels and their underlying buffers * I could not find any slowdown in executing these tests from this change, if anything they are slightly faster now on my machine * Relates #36906 (which may be caused by slowness from leaking memory and also becomes testable in a loop by this change)
Collaborator
|
Pinging @elastic/es-core-infra |
| public abstract class TaskManagerTestCase extends ESTestCase { | ||
|
|
||
| protected static ThreadPool threadPool; | ||
| public static final Settings CLUSTER_SETTINGS = Settings.builder().put("cluster.name", "test-cluster").build(); |
Contributor
Author
There was a problem hiding this comment.
This was just unused
Contributor
Author
|
Jenkins run gradle build tests 2 please |
Contributor
Author
|
Jenkins run gradle build tests 1 please |
Contributor
Author
|
@danielmitterdorfer thanks! |
Contributor
|
This appears to be causing test failures in |
Contributor
Author
|
@romseygeek looking into it. |
Contributor
Author
|
@romseygeek Fixed in #37123 |
original-brownbear
added a commit
that referenced
this pull request
Jan 3, 2019
* If the threadpool gets shut down before the testnodes we run into an error => fixed by moving to single `After` method * Relates #36976
original-brownbear
added a commit
that referenced
this pull request
Jan 4, 2019
* The static threadpool leaks a lot of memory in these tests because it prevents things like the connect listeners from `org.elasticsearch.transport.TcpTransport#initiateConnection` to be GCed between tests (since they keep being referenced by the threadpool) which in turn reference channels and their underlying buffers * I could not find any slowdown in executing these tests from this change, if anything they are slightly faster now on my machine * Relates #36906 (which may be caused by slowness from leaking memory and also becomes testable in a loop by this change)
original-brownbear
added a commit
that referenced
this pull request
Jan 4, 2019
* If the threadpool gets shut down before the testnodes we run into an error => fixed by moving to single `After` method * Relates #36976
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
org.elasticsearch.transport.TcpTransport#initiateConnectionto be GCed between tests (since they keep being referenced by the threadpool) which in turn reference channels and their underlying buffers